<?php

namespace app\validate;

use share\validate\SceneValidate;

class VendorValidate extends SceneValidate{
    protected $rule = [      
        'id' => 'require|integer',
        'name' => 'require|length:1,200',       
        'no' => 'require|length:2,60',
        'remark' => 'require|length:1,200',
        'vendor' => 'require|length:1,200', 
        'aliyun_project_id' => 'integer', 
    ];  
    
    protected $sceneRules = [
        'list' => [
            'id' => 'integer',
            'name' => 'length:1,60',
            'no'  => 'length:1,120',
        ],
        'set' =>[
            'id' => 'require|integer',
            'name' => 'require|length:1,200',       
            'no' => 'require|length:2,60',
            'remark' => 'require|length:1,200',
            'aliyun_project_id' => 'integer', 
        ],
    ];

    protected $scene = [
        'del' => ['id'],
        'list' => ['id','name','no'],
        'info' => ['vendor'],
        'set' => ['id','name','no','remark','aliyun_project_id'],
    ];
}